<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PlPN::TextEditorEventSink - The document event sink</title>
<link rel="stylesheet" href="../PlPN.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>

<body>


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#event">EVENT</a></li>
	<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
</ul>

<hr name="index" />
</div>
<!-- INDEX END -->

<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>PlPN::TextEditorEventSink - The document event sink</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
        {
                package MyTextEditorEventSinkWithUniqueClassName;
                use PlPN;
                our @ISA = qw(PlPN::TextEditorEventSink);
                
                sub OnCharAdded {
                        # do something
                }
                
                # etc.
        } # scope ends; return to original package
        
        use PlPN qw(PN);
        
        my $editorsink = new MyTextEditorEventSinkWithUniqueClassName;
        $some_doc-&gt;AddEventSink($editorsink);
        
        # etc.</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Catches text editor events (well, currently the single text editor event)
from Programmer's Notepad documents.</p>
<p>The default constructor simply blesses an empty hashref into the class.</p>
<p>The default event does nothing; it exists so that derived classes can omit
it without causing Perl to crash when C++ code tries to call the event. (Of
course, it would be rather stupid to implement this kind of event sink and
not implement its only event, but this behavior allows for additional events
later.</p>
<p>The document object is always passed as the first parameter of the event;
this allows the same text editor sink to be used with multiple documents.</p>
<p>
</p>
<hr />
<h1><a name="event">EVENT</a></h1>
<pre>

=item OnCharAdded($doc, $char)</pre>
<p>See <a href="./registerevent.html">PlPN::RegisterEvent</a> for a description of this
event.</p>
<p>
</p>
<hr />
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
<p>Copyright (c) 2012 Sean Healy. All rights reserved.</p>
<p>This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.</p>

</body>

</html>
